<div id="new-product">
    <form method="post" id="submit" name="submit">
        <div class="new-product-left">
            <div>
                <input id="articles" name="article" class="new-product-title" type="text" placeholder="Theme name">
            </div>
            <div>
                <textarea class=""></textarea>
            </div>
            <div style="width: 100%; height: 40px">
                <button type="button" class="button-item" id="bootbox-regular">Hình ảnh</button>
            </div>
            <div id="content-vn" class="editors">
                <span class="books-info-title">Thông tin chi tiết</span>
                <textarea class="ckeditor" cols="80"  name="editor_vn" rows="10"></textarea>
            </div>
        </div>
        <div class="new-product-right">
            <div class="new-product-info">
                <div class="new-product-info-title"><label>Thông tin bài viết</label></div>
                <div class="new-product-info-item">
                    <div class="product-item-child">
                        <label>Demo url:</label>
                        <input name="cover" type="text" placeholder="Đường dẫn demo theme">
                    </div>
                </div>
                <div class="new-product-info-item">
                    <div class="product-item-child">
                        <label>Danh mục:</label>
                    </div>
                </div>
                <div class="new-product-info-item">
                    <div class="product-item-child">
                        <label>Hình ảnh (nếu có):</label>
                        <div class="product-item-img">
                            <img src="<?php echo ROOT_URL; ?>public/images/images-default.gif">
                            <input type="hidden" name="image">
                        </div>
                    </div>
                </div>
                <div class="new-product-info-item">
                    <div class="product-item-child">
                        <label id="publish-notification"></label>
                        <button type="button" class="product-item-submit button-item" onclick="publishProduct();">Đăng tin</button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<link type="text/css" rel="stylesheet" href="<?php echo ROOT_URL; ?>public/media/media_style.css">
<?php require_once ROOT_PATH."/views/admin/layout/media.php"; ?>
<script>

    function publishProduct(){
        var articles = $('#articles');
        var notice = $('#publish-notification');
        if(articles.val() == ""){
            notice.text("Chưa nhập tên bài viết").show();
        }else{
            $('#submit').submit();
        }
    }
</script>
<script src="<?php echo ROOT_URL; ?>public/media/media.js"></script>
